from django.contrib import admin
from .models import Category
# Register your models here.
class CategoryInline(admin.TabularInline):
    model = Category
    extra = 0
    fields = ('name', 'icon', 'pid')
    show_change_link = True
class CategoryAdmin(admin.ModelAdmin):
    list_display = ('name', 'icon','pid')
    search_fields = ('name',)
    list_filter = ('pid',)
admin.site.register(Category, CategoryAdmin)